home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wtek0693.zip / OOPALLEY.ZIP / LINK.H < prev    next >
C/C++ Source or Header  |  1993-04-27  |  1KB  |  32 lines

  1. #ifndef LINK_H
  2. #define LINK_H
  3.  
  4. #include "object.h"
  5.  
  6. extern const Class class_Link;
  7.  
  8. class LinkedList;
  9.  
  10. ////////////////////////////////////////////////////////////
  11. // class Link (declaration)
  12. ////////////////////////////////////////////////////////////
  13. class Link: public Object {
  14.     Link*   next;                           // pointer to next Link or nil 
  15.     friend  LinkedList;
  16. protected:
  17.                 // protected constructors
  18.                 Link(const Link& nextlink)  { next = (Link*)&nextlink; }
  19.                 Link()                      { next = (Link*)nil; }
  20. public:
  21.                 // destructor
  22.                 ~Link();
  23.  
  24.     Link*                   nextLink() const            { return next; }
  25.     Link*                   nextLink(Link* nextlink)    { next = nextlink; return next; }
  26.     virtual void            deepenShallowCopy();
  27.     virtual const Class*    isA() const;
  28.     virtual Object*         shallowCopy() const;        // shouldNotImplement
  29. };
  30.  
  31. #endif
  32.